#include "errStream.hpp"
#include "mainProcess.hpp"
#include "outStream.hpp"

auto main(int argc, char **argv) -> int {
    OutStream out(5 * 1024);
    ErrStream err(5 * 1024);

    auto old = std::cout.rdbuf(&out);
    auto errOld = std::cerr.rdbuf(&err);

    MainProcess mainProcess;

    while (true) {
        std::this_thread::sleep_for(std::chrono::seconds(600));
    }

    std::cout.rdbuf(old);
    std::cerr.rdbuf(errOld);

    return 0;
}
